package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.common.annotation.AutoFill;
import com.ruoyi.common.enums.AutoFillType;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DispatchMonitoringItemGroupMapper;
import com.ruoyi.system.domain.DispatchMonitoringItemGroup;
import com.ruoyi.system.service.IDispatchMonitoringItemGroupService;

/**
 * 监测项分组Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-02
 */
@Service
public class DispatchMonitoringItemGroupServiceImpl implements IDispatchMonitoringItemGroupService 
{
    @Autowired
    private DispatchMonitoringItemGroupMapper dispatchMonitoringItemGroupMapper;

    /**
     * 查询监测项分组
     * 
     * @param monitoringItemGroupId 监测项分组主键
     * @return 监测项分组
     */
    @Override
    public DispatchMonitoringItemGroup selectDispatchMonitoringItemGroupByMonitoringItemGroupId(Long monitoringItemGroupId)
    {
        return dispatchMonitoringItemGroupMapper.selectDispatchMonitoringItemGroupByMonitoringItemGroupId(monitoringItemGroupId);
    }

    /**
     * 查询监测项分组列表
     * 
     * @param dispatchMonitoringItemGroup 监测项分组
     * @return 监测项分组
     */
    @Override
    public List<DispatchMonitoringItemGroup> selectDispatchMonitoringItemGroupList(DispatchMonitoringItemGroup dispatchMonitoringItemGroup)
    {
        return dispatchMonitoringItemGroupMapper.selectDispatchMonitoringItemGroupList(dispatchMonitoringItemGroup);
    }

    /**
     * 新增监测项分组
     * 
     * @param dispatchMonitoringItemGroup 监测项分组
     * @return 结果
     */
    @AutoFill(operation = AutoFillType.INSERT)
    @Override
    public int insertDispatchMonitoringItemGroup(DispatchMonitoringItemGroup dispatchMonitoringItemGroup)
    {
        return dispatchMonitoringItemGroupMapper.insertDispatchMonitoringItemGroup(dispatchMonitoringItemGroup);
    }

    /**
     * 修改监测项分组
     * 
     * @param dispatchMonitoringItemGroup 监测项分组
     * @return 结果
     */
    @AutoFill(operation = AutoFillType.UPDATE)
    @Override
    public int updateDispatchMonitoringItemGroup(DispatchMonitoringItemGroup dispatchMonitoringItemGroup)
    {
        return dispatchMonitoringItemGroupMapper.updateDispatchMonitoringItemGroup(dispatchMonitoringItemGroup);
    }

    /**
     * 批量删除监测项分组
     * 
     * @param monitoringItemGroupIds 需要删除的监测项分组主键
     * @return 结果
     */
    @Override
    public int deleteDispatchMonitoringItemGroupByMonitoringItemGroupIds(Long[] monitoringItemGroupIds)
    {
        return dispatchMonitoringItemGroupMapper.deleteDispatchMonitoringItemGroupByMonitoringItemGroupIds(monitoringItemGroupIds);
    }

    /**
     * 删除监测项分组信息
     * 
     * @param monitoringItemGroupId 监测项分组主键
     * @return 结果
     */
    @Override
    public int deleteDispatchMonitoringItemGroupByMonitoringItemGroupId(Long monitoringItemGroupId)
    {
        return dispatchMonitoringItemGroupMapper.deleteDispatchMonitoringItemGroupByMonitoringItemGroupId(monitoringItemGroupId);
    }
}
